package com.baishancloud.log.live.spider

import java.io.Serializable
import scala.beans.BeanProperty

class CalculateSpider extends Serializable

//分区字段
case class SpiderLogKey(time_at_1min: String, domain: String, country: String, province: String, isp: String, log_type: Int) extends Serializable

//转化对象，包含所有维度和用于计算uv的clientId
case class SpiderLog(time_at_1min: String, domain: String, country: String, province: String, isp: String, log_type: Int, uuid: String) extends Serializable {
  def getKey: SpiderLogKey = {
    SpiderLogKey(time_at_1min, domain, country, province, isp, log_type)
  }
}

//输出结果，最终转化为json字符串
case class SpiderResult(@BeanProperty time_at_1min: String, @BeanProperty domain: String, @BeanProperty country: String, @BeanProperty province: String, @BeanProperty isp: String, @BeanProperty log_type: Int, @BeanProperty uv: Long) extends Serializable
